// 可选参
function buildName(firstName:string,lastName?:string) {
  if (lastName) {
    return firstName + '' + lastName
  } else {
    return firstName
  }
}

console.log(buildName('高'));
console.log(buildName('高','无'));

// 无返回值
function eachArr(arr:number[]):void {
  arr.forEach((item)=>{
    console.log('item',item);
  })
}

const res = eachArr([1,2])
console.log(res);
